﻿#include "keyboardlistenthread.h"

#include <QDebug>

KeyboardListenThread::KeyboardListenThread(QObject *parent)
    : QThread(parent)
{

}

KeyboardListenThread::~KeyboardListenThread()
{
    stop();
    quit();
    wait();
}

void KeyboardListenThread::stop()
{
    qDebug() << "KeyboardListenThread Thread stop: " << QThread::currentThreadId();
    QMutexLocker locker(&m_lock);
    isStop = true;
}

void KeyboardListenThread::run()
{
    qDebug() << "KeyboardListenThread Thread run: " << QThread::currentThreadId();
    char key;
    while(!isStop)
    {

    }
}
